package com.umeox.quranplayer.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Rambo 2022/9/21
 * Describe:
 */
public class QuranChallenge implements Parcelable {


    /**
     * id : 1
     * chapterIndex : 2
     * duration : 30
     * deadline : 22:00
     * rewardValue : 12
     */

    public int id;
    public int chapterIndex;
    public int duration;
    public String deadline;
    public int rewardValue;

    public QuranChallenge(){

    }

    protected  QuranChallenge(Parcel in){
        id = in.readInt();
        chapterIndex = in.readInt();
        duration = in.readInt();
        deadline = in.readString();
        rewardValue = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.chapterIndex);
        dest.writeInt(this.duration);
        dest.writeString(this.deadline);
        dest.writeInt(this.rewardValue);
    }


    @Override
    public String toString() {
        return "QuranLearnChallengeDTO{" +
                "id=" + id +
                ", chapterIndex=" + chapterIndex +
                ", duration=" + duration +
                ", deadline='" + deadline + '\'' +
                ", rewardValue=" + rewardValue +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<QuranChallenge> CREATOR = new Creator<QuranChallenge>() {
        @Override
        public QuranChallenge createFromParcel(Parcel in) {
            return new QuranChallenge(in);
        }

        @Override
        public QuranChallenge[] newArray(int size) {
            return new QuranChallenge[size];
        }
    };
}
